package com.community.factory;

import com.community.domain.enity.UserVo;
import com.community.remote.SystemRemote;
import com.community.result.Result;
import org.springframework.cloud.openfeign.FallbackFactory;

/**
 * 类名称： SystemRemoteFactory
 * 描述：
 * 创建人：zyj
 * 创建时间：2023/11/7 14:04
 */
public class SystemRemoteFactory implements FallbackFactory<SystemRemote> {
    @Override
    public SystemRemote create(Throwable cause) {
        return new SystemRemote() {
            @Override
            public Result<UserVo> loginByPassword(UserVo userVo) {
                return Result.error("网络故障");
            }
        };
    }
}
